//
//  RecommendFriendTableCell.m
//  MiaoTu
//
//  Created by dllo on 16/9/1.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "RecommendFriendTableCell.h"
#import "UIImageView+WebCache.h"
#import "UserInfo.h"
#import "UIView+Frame.h"

@interface RecommendFriendTableCell ()
@property (weak, nonatomic) IBOutlet UIImageView *headImage;
@property (weak, nonatomic) IBOutlet UILabel *nameLabel;
@property (weak, nonatomic) IBOutlet UILabel *detailLabel;

@end

@implementation RecommendFriendTableCell

- (void)setItems:(UserInfo *)items {
    _items = items;
    [_headImage sd_setImageWithURL:[NSURL URLWithString:_items.HeadUrl] placeholderImage:[UIImage imageNamed:@"defaultHeadImage"]];
    _nameLabel.text = _items.Nickname;
    _detailLabel.text = _items.Content;
}

- (void)layoutSubviews {
    [super layoutSubviews];
    [_headImage layoutIfNeeded];
    _headImage.layer.cornerRadius = _headImage.dk_width / 2.0f;
    _headImage.layer.masksToBounds = YES;
    
}


- (void)awakeFromNib {
    // Initialization code
    [super awakeFromNib];
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
